//
//  storeViewController.m
//  ManStoreDemo
//
//  Created by qianfeng01 on 15/7/21.
//  Copyright (c) 2015年 xiangmu. All rights reserved.
//

#import "storeViewController.h"
#define kUrl @"http://h5.m.taobao.com/cm/snap/index.html?id=%ld&ttid=2014_0_23073561%40baichuan_android_1.5.0"
#define kScreenSize [UIScreen mainScreen].bounds.size
@interface storeViewController ()


@end

@implementation storeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title=@"宝贝详情";
    UIBarButtonItem *leftitem=[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"return_1"] style:UIBarButtonItemStyleDone target:self action:@selector(back:)];
    
    self.navigationItem.leftBarButtonItem=leftitem;
    [self createWebView];
}
-(void)back:(UIBarButtonItem *)item{
    [self.navigationController popViewControllerAnimated:YES];
}
-(void)createWebView{
    NSString *url=[NSString stringWithFormat:kUrl,self._id.integerValue];
    UIWebView *_webView=[[UIWebView alloc] initWithFrame:CGRectMake(0, 0,kScreenSize.width , kScreenSize.height-64)];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
    [_webView loadRequest:request];
    [self.view addSubview:_webView];
}


@end
